<%@ page import="com.qf.om.servlet.CodeServlet" %><%--
  Created by IntelliJ IDEA.
  User: JIN PANGZI
  Date: 2022/3/29
  Time: 15:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fu" %>
<html>
<head>
    <title>登录页面</title>
    <link rel="stylesheet" href="css/login.css"/>
    <script src="js/login.js"></script>
</head>

<body>
<script>

</script>
<div class="title_div">
    <h1>学生管理系统-管理端</h1>
    <c:if test="${param.status=='1'}">
        <script>alert("用户名或密码错误！")</script>
    </c:if>
    <c:if test="${param.status=='2'}">
        <script>alert("验证码错误！") </script>
    </c:if>
    <c:if test="${param.status=='3'}">
        <script>alert("验证码已失效！") </script>
    </c:if>
    <%--    <% String status = request.getParameter("status");--%>
    <%--        if ("1".equals(status)) {--%>
    <%--    %>--%>
    <%--    <script>alert("用户名或密码错误！")</script>--%>
    <%--    <%--%>
    <%--    } else if ("2".equals(status)) {--%>
    <%--    %>--%>
    <%--    <script>alert("验证码错误！") </script>--%>
    <%--    <%--%>
    <%--    } else if ("3".equals(status)) {--%>
    <%--    %>--%>
    <%--    <script>alert("验证码已失效！") </script>--%>
    <%--    <%}%>--%>
</div>
<div class="login_div">
    <form action="login" method="post">
        <table>
            <tr>
                <td>用户名</td>
                <td><label>
                    <input name="username" placeholder="请输入用户名"/>
                </label></td>
            </tr>
            <tr>
                <td>密码</td>
                <td><label>
                    <input type="password" name="password" placeholder="请输入密码"/>
                </label></td>
            </tr>
            <tr>
                <td>验证码</td>
                <td>
                    <div class="code_div">
                        <label>
                            <input class="code" name="code" placeholder="验证码"/>
                        </label>
                        <img class="img_code" src="codeImg" onclick="resetCdoe(this)" alt="">
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: center">
                    <button type="submit">登录</button>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <button type="button" onclick="gotoRegsier()">注册</button>
                </td>
            </tr>

        </table>
    </form>
</div>

</body>
</html>
